import request from '@/utils/request'

// 查询首页设置列表
export function listHomepage(query) {
  return request({
    url: '/mobile/homepage/list',
    method: 'get',
    params: query
  })
}

// 查询首页设置详细
export function getHomepage(id) {
  return request({
    url: '/mobile/homepage/' + id,
    method: 'get'
  })
}

// 新增首页设置
export function addHomepage(data) {
  return request({
    url: '/mobile/homepage',
    method: 'post',
    data: data
  })
}

// 修改首页设置
export function updateHomepage(data) {
  return request({
    url: '/mobile/homepage',
    method: 'put',
    data: data
  })
}

// 删除首页设置
export function delHomepage(id) {
  return request({
    url: '/mobile/homepage/' + id,
    method: 'delete'
  })
}

export function getHomeDetail(data) {
  return request({
    url: '/mobile/homepage/getHomePage',
    method: 'post',
    data: data
  })
}

export function saveHomeDetail(data) {
  return request({
    url: '/mobile/homepage/save',
    method: 'post',
    data: data
  })
}
